<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<div id="uploadForm">
			<input id="file" type="file" name="logo" />
			<input type="button" value="上传" onclick="doUpload()" />
		</div>
	</body>
	<script src="js/jquery.js"></script>
	<script>
		function doUpload() {
			var formData = new FormData();
			//记得append("xxx")名字要跟后端一致
			formData.append('logo', $('#file')[0].files[0]);
			$.ajax({
				url: 'http://localhost:3000/upload-single',
				type: 'POST',
				cache: false,
				data: formData,
				processData: false,
				contentType: false
			}).done(function(res) {}).fail(function(res) {});
		}
	</script>
</html>